<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "t_base_project".
 *
 * @property string $id
 * @property string $name 名称
 * @property string $pinyin 拼音缩写
 * @property string $major_dict_id
 * @property int $major_code
 * @property string $descrition 简介
 * @property int $publishing_org 发布机构
 * @property string $type
 * @property string $status
 * @property string $url
 * @property string $note
 * @property string $create_by 创建人
 * @property string $create_time 创建时间
 * @property string $update_by 更新人
 * @property string $update_time 更新时间
 * @property int $del_flag 删除标示
 */
class TBaseProject extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 't_base_project';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id'], 'required'],
            [['major_code', 'publishing_org', 'del_flag'], 'integer'],
            [['descrition'], 'string'],
            [['create_time', 'update_time'], 'safe'],
            [['id', 'major_dict_id', 'create_by', 'update_by'], 'string', 'max' => 36],
            [['name'], 'string', 'max' => 32],
            [['pinyin', 'url', 'note'], 'string', 'max' => 255],
            [['type', 'status'], 'string', 'max' => 64],
            [['id'], 'unique'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'name' => 'Name',
            'pinyin' => 'Pinyin',
            'major_dict_id' => 'Major Dict ID',
            'major_code' => 'Major Code',
            'descrition' => 'Descrition',
            'publishing_org' => 'Publishing Org',
            'type' => 'Type',
            'status' => 'Status',
            'url' => 'Url',
            'note' => 'Note',
            'create_by' => 'Create By',
            'create_time' => 'Create Time',
            'update_by' => 'Update By',
            'update_time' => 'Update Time',
            'del_flag' => 'Del Flag',
        ];
    }
}
